import http from "@/service/request";
import type { params } from "../type";

enum API {
  // 获取轮播图
  GET_SWIPER_IMGS = `/api/shop/carousel/getAll`,
  //   获取全部的商品分类
  GET_ALL_PRODUCTS = "/api/shop/goods",
}

export function api_get_swiper_imgs(site_id: number) {
  return http({
    method: "get",
    url: API.GET_SWIPER_IMGS,
    params: {
      project_id: 1,
      site_id,
    },
  });
}

export function get_all_products(params: params) {
  return http({
    method: "get",
    url: API.GET_ALL_PRODUCTS,
    params,
  });
}
